#ifndef __PROGRESS_BAR_
#define __PROGRESS_BAR_

#define FAIL        (0)
#define SUCCESS     (1)

#define PROGRESS_RESETCLOUR	"\033[0m"
#define PROGRESS_RED		"\033[40;31m"
#define PROGRESS_GREEN		"\033[40;32m"
#define PROGRESS_YELLOW		"\033[40;33m"
#define PROGRESS_BLUE		"\033[40;34m"

#define NOMAL   0
#define RED     1
#define GREEN   2
#define YELLOW  3
#define BLUE    4

#define DEFAULT_MARK    '>'
#define DEFALUT_LENGTH  (50)
#define LENGTH_MAX      (100)
#define LENGTH_MIN      (10)
#define DEFALUT_SPEED   (5)
#define SPEED_MAX       (10)
#define SPEED_MIN       (0)
#define DEFALUT_COLOR   (0)
#define COLOR_MAX       (4)
#define COLOR_MIN       (0)

 struct progress_bar{
    int length;     /*progress bar length*/
    int speed;      /*progress bar speed*/
    int color;      /*0 nomal, 1 red, 2 green, 3 yellow, 4 blue*/
    char mark;	    /*progress bar mark*/
};

extern int get_entrance_param( int param_argc, char *param_argv[]);
extern int progress_bar_init(char mark, int length, int speed, int color);
extern int progress_bar_run();
extern void progress_bar_reset();

#endif